package com.healthmgmt.app.service.impl;

import java.util.List;

import com.healthmgmt.app.domain.ConsultationReply;
import com.healthmgmt.app.mapper.ConsultationReplyMapper;
import com.healthmgmt.app.service.IConsultationReplyService;
import com.healthmgmt.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 回复Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-29
 */
@Service
public class ConsultationReplyServiceImpl implements IConsultationReplyService
{
    @Autowired
    private ConsultationReplyMapper consultationReplyMapper;

    /**
     * 查询回复
     * 
     * @param replyId 回复主键
     * @return 回复
     */
    @Override
    public ConsultationReply selectConsultationReplyByReplyId(Long replyId)
    {
        return consultationReplyMapper.selectConsultationReplyByReplyId(replyId);
    }

    /**
     * 查询回复列表
     * 
     * @param consultationReply 回复
     * @return 回复
     */
    @Override
    public List<ConsultationReply> selectConsultationReplyList(ConsultationReply consultationReply)
    {
        return consultationReplyMapper.selectConsultationReplyList(consultationReply);
    }

    /**
     * 新增回复
     * 
     * @param consultationReply 回复
     * @return 结果
     */
    @Override
    public int insertConsultationReply(ConsultationReply consultationReply)
    {
        consultationReply.setCreateTime(DateUtils.getNowDate());
        return consultationReplyMapper.insertConsultationReply(consultationReply);
    }

    /**
     * 修改回复
     * 
     * @param consultationReply 回复
     * @return 结果
     */
    @Override
    public int updateConsultationReply(ConsultationReply consultationReply)
    {
        consultationReply.setUpdateTime(DateUtils.getNowDate());
        return consultationReplyMapper.updateConsultationReply(consultationReply);
    }

    /**
     * 批量删除回复
     * 
     * @param replyIds 需要删除的回复主键
     * @return 结果
     */
    @Override
    public int deleteConsultationReplyByReplyIds(Long[] replyIds)
    {
        return consultationReplyMapper.deleteConsultationReplyByReplyIds(replyIds);
    }

    /**
     * 删除回复信息
     * 
     * @param replyId 回复主键
     * @return 结果
     */
    @Override
    public int deleteConsultationReplyByReplyId(Long replyId)
    {
        return consultationReplyMapper.deleteConsultationReplyByReplyId(replyId);
    }
}
